%% Dispersion through the currugated and straight channels
clear all; close all;
%%%%%%%%%%%%%%%%%%%% root
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
root = 'D:\';
%%%%%%%%%%


load([root,'Compilation DiodeNatCom\figure 3\dispersion.mat'])
hFig = figure('color',[1,1,1],'Units','centimeters','Position',[5,5,1.2*4.5,1.2*4]); hold on; box on;
cmap =[[0,0,1];[1,0,0];[0,0.75,0];[140,100,0]/255];%'b','r','g'};
% rule of thumb
Phis = [1,1.3,1.8,2.5];
colorPhis = [[0,0,0];[0,0,1];[1,0,0];[0,0.75,0]];

for i=1:4
    plot([Phis(i),Phis(i)],[1,10000],'color',colorPhis(i,:),'LineWidth',1.4,'LineStyle','--');
end

D0 = dispersion(5).D; % dispersion in free space

% dispersion in the four different geometries
for r=1:4
plot(dispersion(r).Phi,dispersion(r).D/D0,'color',cmap(r,:),'LineStyle','none','LineWidth',.5,'Marker','s','MarkerSize',4,'MarkerFaceColor',cmap(r,:));
end
plot([2,10],1*sqrt([50,10]),'k-','LineWidth',1.5)
set(gca,'YScale','log');
set(gca,'XScale','log');
yticks([0.01,1,10,100,1000,10000]);